import { Body, Controller } from '@nestjs/common';
import { GradesService } from './grades.service';
import { CreateGradeDto } from './dto/create-grade.dto';
import { Post } from '@nestjs/common';
import type { QueryParams } from 'src/types';

@Controller('grades')
export class GradesController {
  constructor(private readonly gradesService: GradesService) {}

  @Post()
  create(@Body() createGradeDto: CreateGradeDto) {
    return this.gradesService.create(createGradeDto);
  }

  @Post('list')
  list(@Body() queryParams: QueryParams) {
    return this.gradesService.list(queryParams);
  }
}
